<html>
	<head>
		<title><%= data.site.uri.host %> changed</title>
		<style type="text/css">
.msg {
	font-size: 0.98em;
}

.diff {
	font-size: 12px;
	font-family: 'Bitstream Vera Sans Mono','Courier',monospace;
}

.diff ul {
	list-style: none;
	display: table;
	padding: 0;
	margin: 0.5em 0 0 0.5em;
	border: 1px solid #CCCCCC;
}

.diff li {
	padding: 0;
	display: table-row;
	margin: 0;
	background: #f8f8ff;
}

.diff .new, .diff .old {
	color: #999;
}

.diff .ins {
	background: #dfd;
}

.diff .ins .x {
	background: #8f8;
	margin: 0;
	padding: 0;
}

.diff .del {
	background: #fdd;
}

.diff .del .x {
	background: #faa;
	margin: 0;
	padding: 0;
}

.diff .range {
	background: #eaf2f5;
	color: #999;
}

.diff .other {
}
		</style>
	</head>
	<body>
<% if data.diff.nil? %>
		<div class="msg">
			Checked <a href="<%= data.site.uri.to_s %>"><%= data.site.uri.to_s %></a> the first time so no diff was possible.
		</div>
<% else %>
		<div class="msg">
			Change at <a href="<%= data.site.uri.to_s %>"><%= data.site.uri.to_s %></a> - diff follows:
		</div>
		<div class="diff">
			<ul>
<% for o in data.diff.di %>
<% if o.status == :new %>
				<li class="new">+++<%= o.text %></li>
<% elsif o.status == :old %>
				<li class="old">---<%= o.text %></li>
<% elsif o.status == :range %>
				<li class="range">@@<%= o.text %></li>
<% elsif o.status == :ins %>
				<li class="ins">+&nbsp;<%= o.html_hilite_text('x').lstrip %></li>
<% elsif o.status == :del %>
				<li class="del">-&nbsp;<%= o.html_hilite_text('x').lstrip %></li>
<% else %>
				<li class="other">&nbsp;&nbsp;<%= o.text.substring(1).lstrip %></li>
<% end %>
<% end %>
			</ul>
		</div>
		<div>
			nHunks: <%= data.diff.nhunks %>, 
			nIns: <%= data.diff.ninsertions %>, 
			nDel: <%= data.diff.ndeletions %>, 
			nLinesC: <%= data.diff.nlinesc %>, 
			nCharsC: <%= data.diff.ncharsc %>
		</div>
<% end %>
	</body>
</html>
